home *** CD-ROM | disk | FTP | other *** search
/ Delphi Magazine Collection 2001 / Delphi Magazine Collection 20001 (2001).iso / DISKS / Issue33 / dbexustr / DBExUsTr.Zip / testdlg.pas < prev    next >
Encoding:
Pascal/Delphi Source File  |  1997-12-26  |  1.3 KB  |  56 lines

  1.  
  2. unit Testdlg;
  3.  
  4. interface
  5.  
  6. uses
  7.   SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls,
  8.   Forms, Dialogs, ExtCtrls, StdCtrls, FileCtrl, Buttons, DB, DBTables,
  9.   Dbexport;
  10.  
  11. type
  12.   TFrmDemo = class(TForm)
  13.     BitBtn1: TBitBtn;
  14.     BitBtn2: TBitBtn;
  15.     FilterComboBox1: TFilterComboBox;
  16.     DirectoryListBox1: TDirectoryListBox;
  17.     FileListBox1: TFileListBox;
  18.     Label1: TLabel;
  19.     DriveComboBox1: TDriveComboBox;
  20.     tbl: TTable;
  21.     DBExportDialog1: TDBExportDialog;
  22.     CBoxMultiTable: TCheckBox;
  23.     procedure BitBtn1Click(Sender: TObject);
  24.     procedure FileListBox1DblClick(Sender: TObject);
  25.   private
  26.     { DΘclarations private }
  27.   public
  28.     { DΘclarations public }
  29.   end;
  30.  
  31. var
  32.   FrmDemo: TFrmDemo;
  33.  
  34. implementation
  35.  
  36. {$R *.DFM}
  37.  
  38. procedure TFrmDemo.BitBtn1Click(Sender: TObject);
  39. begin
  40.   if (FileListBox1.ItemIndex <> -1) then
  41.      begin
  42.      tbl.DataBaseName := DirectoryListBox1.Directory;
  43.      tbl.TableName := FileListBox1.Items.Strings[FileListBox1.ItemIndex];
  44.      DBExportDialog1.IniFile := 'NewFormats.ini';
  45.      DBExportDialog1.MultiTable := CBoxMultiTable.Checked;
  46.      DBExportDialog1.execute;
  47.      end;
  48. end;
  49.  
  50. procedure TFrmDemo.FileListBox1DblClick(Sender: TObject);
  51. begin
  52.     BitBtn1Click(self);
  53. end;
  54.  
  55. end.
  56.